import {
    h,
    render
} from "vue";
import child from "./child.vue";
export function dialog(params = {}) {
    let opts = {};
    if (typeof params === 'object') {
        opts = params
    } else {
        opts.title = params;
    }

    const vnode = h(child, {
        class: "cancel",
        title: opts.title,
        closebtn: opts.closebtn,
    }, {

        default: () => opts?.slot?.default,

    });
    render(vnode, document.body)
}